//
//  APIResponse.m
//  ProjectDemo
//
//  Created by IOS3 on 2018/10/23.
//  Copyright © 2018 IOS3. All rights reserved.
//

#import "APIResponse.h"

@implementation APIResponse

- (NSString *)description {
    return [NSString stringWithFormat:@"\n状态吗: %zd,\n错误: %@,\n响应头: %@,\n响应体: %@", self.statusCode, self.error, self.headers, self.responseObject];
}

- (void)setError:(NSError *)error {
    _error = error;
    self.statusCode = error.code;
    self.errorMsg = error.localizedDescription;
}

@end
